<?php 
use services\models\MemberInfo;
use services\models\MemberInfoBestry;

$goCart = Yii::$app->urlManager->createUrl(["cart"]);
?>
<?php $this->beginBlock('css');?>
<link rel="stylesheet" type="text/css" href="<?=Yii::getAlias('@static')?>/wap/liketry/css/goods.css">
<?php $this->endBlock();?>
	<header>
      <div class="header-left" onclick="history.go(-1)"><span class="icon icon-arrow-left"></span></div>
      <h1>商品详情-全部评论</h1>
      <div class="header-right" onclick="$.go('<?=Yii::$app->urlManager->createUrl(['index'])?>');" ><span class="icon icon-home"></span></div>
    </header>
	
	<div class="goods-comment">
		<div class="title">全部评论（<span><?php echo $reply_list['return_num_all']?></span>）</div>
		<ul class="g-comment-list">
		<?php 
		if(!empty($reply_list['reply_info'][0])):
		foreach ($reply_list['reply_info'] as $k=>$v):
		$src =MemberInfo::getAvatarByMemberId($v['bestry_uid'],true);
        $member_id = MemberInfoBestry::getMemberIdByBestryUid($v['bestry_uid']);
        $member_name = MemberInfo::getUserNameByMemberId($member_id);
		?>
		<li>
			<div class="header-photo"><img <?=$src;?> /></div>
			<div class="main">
				<p class="username"><?php echo $member_name;?></p>
				<p class="text enclick"><?php echo $v['content'];?></p>
				<p class="arrow enclick"><span class="icon-arrow-down"></span><span>展开评论</span></p>
				<p class="star">
					<?php for ($i =0 ;$i < 5 ;$i++) : ?>
						<span class="<?php if($i < $v['level']) :?>cur<?php else:?><?php endif; ?>" ></span>
					<?php endfor; ?>
					
				</p>
				<?php $date = explode(" ", $v['create_time']);?>
				<p class="date"><span><?php echo $date[0];?></span><?php echo $date[1];?></p>
				<?php if($v['status'] == 1):?>
					<p class="jinghua"></p>
			    <?php endif;?>
			</div>
		</li>
		<?php endforeach;
		else:?>
		<li class="nolist">暂无评论</li>
		<?php endif;?>
		</ul>
	</div>
	<div class="fixed-right">
	    <div class="back-top" id="backTop"></div>
	</div>  
	
	
<script src="<?=Yii::getAlias('@static')?>/wap/common/js/zepto.min.js"></script>
<script src="<?=Yii::getAlias('@static')?>/wap/common/js/fastclick.min.js"></script>
<script src="<?=Yii::getAlias('@static')?>/wap/common/js/king.wap.js"></script>
<script src="<?=Yii::getAlias('@static')?>/wap/liketry/js/detail-comment.js"></script>
<script>
var requestReviewUrl = "<?=Yii::$app->urlManager->createUrl(['goods-detail/getreplymore']);?>"; //评论接口
var product_id = "<?php echo Yii::$app->request->get('product_id');?>";
</script>